package com.ourchem.bus.mapper;

import com.ourchem.bus.entity.FileUpload;
import com.ourchem.bus.vo.PublicFileVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface FileUploadMapper {

	    int deleteByPrimaryKey(String id);

	    int insert(FileUpload record);

	    FileUpload selectByPrimaryKey(String id);

	    List<FileUpload> selectAll();

	    int updateByPrimaryKey(FileUpload record);

	    FileUpload selectFileUpload(@Param("md5")String md5, @Param("userId")String userId,
                                    @Param("status")Integer status, @Param("fileName")String fileName, @Param("fileType")Integer fileType);

	    Integer updateFileUploadStatusDel(@Param("list") List<String> list, @Param("status")Integer status);

	    List<FileUpload> getFileUpload(@Param("relationId")String relationId, @Param("fileType")Integer fileType, @Param("isPublic")Integer isPublic);

	    List<FileUpload> getFileUploadByRelationIdList(@Param("list") List<String> list, @Param("fileType")Integer fileType);

	    List<FileUpload> fileUploadListByIds(@Param("list") List<String> list);

	    /**
	     * 根据status查出list集合
	     */
	    List<FileUpload> getDeleteStatus(@Param("status")Integer status);

	    /**
	     * 批量修改公开的状态
	     */
	    Integer updatePublicStatus(@Param("list") List<PublicFileVO> list);
}
